<!-- $Id: restore.html 72 2011-03-29 03:28:50Z nicholasinlove1986@gmail.com $ -->
<include file="Public:pageheader"/>
<script type="text/javascript">
function confirmSubmit(form){
	var j = 0;
	for(var i=0; i<form.elements.length; i++){
		if(form.elements[i].name == "chkvalue[]"){
			if(form.elements[i].checked){
				j++;
			}
		}
	}
	if(j == 0){
		alert("{$Think.lang.select_someone}");
		return false;
	}
	else{
		var r = confirm("{$Think.lang.confirm}");
		return r == true ? true : false;
	}
}

function rowClicked(obj)
{
  var row = obj.parentNode.parentNode;
  var tbl = row.parentNode.parentNode;
  var test = false;
  var img = '';

  if (obj.src.substr(obj.src.lastIndexOf('/') + 1) == "menu_minus.gif")
  obj.src = "__PUBLIC__/Images/menu_plus.gif";
  else
  obj.src = "__PUBLIC__/Images/menu_minus.gif";



  for (i = 0; i < tbl.rows.length; i++)
  {
    var cell = tbl.rows[i].cells[1];

    if (cell && cell.childNodes[0].src)
    {
      img = cell.childNodes[0].src.substr(cell.childNodes[0].src.lastIndexOf('/') + 1);
    }
    else
    {
      img = '';
    }

    if (test && img)
    {
      if (img == "menu_arrow.gif")
      {
        tbl.rows[i].style.display = tbl.rows[i].style.display != 'none' ? 'none' : (Browser.isIE) ? 'block' : 'table-row';
      }
      else
      {
        test=false;
      }
    }

    if (tbl.rows[i] == row)
    {
      test = true;
    }
  }
}
</script>
<present name='warning'>
<ul style="padding:0; margin: 0; list-style-type:none; color: #CC0000;">
  <li style="border: 1px solid #CC0000; background: #FFFFCC; padding: 10px; margin-bottom: 5px;" >{$warning}</li>
</ul>
</present>
<div class="list-div">
  <form method="post" action="__URL__/uploadSql" name="listForm_sql" enctype="multipart/form-data">
  <table cellspacing='1' cellpadding='3'>
  <tr>
    <th colspan="2">{$Think.lang.db_restore}</th>
  </tr>
  <tr>
    <td>{$Think.lang.sqlfile}</td>
    <td><input type="file" name="sqlfile" size="50"></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><input type="hidden" name = "act" value = "upload_sql"><input type="submit" value="{$Think.lang.sqluplode}" class="button" disabled="disabled"></td>
  </tr>
  </table>
  </form>
</div>
<ul style="padding-top:5px; margin: 0; list-style-type:none; color: #CC0000;">
  <li style="border: 1px solid #CC0000; background: #FFFFCC; padding: 10px; margin-bottom: 5px; line-height:25px" >{$Think.lang.db_notice}</li>
</ul>
<form method="post" action="__URL__/remove" name="listForm" onSubmit="return confirmSubmit(this);">
<div class="list-div" id="listDiv">
<table id="list-table" cellpadding="3" cellspacing="1">
  <tbody>
  <tr>
    <th colspan="7">{$Think.lang.server_sql}</th>
  </tr>
<tr>
    <th width="10%"><input type="checkbox" id="chkOpenAll" onclick="openAll(this)" />{$Think.lang.drop}</th>
    <th width="20%">{$Think.lang.file_name}</th>
	<th width="8%">{$Think.lang.file_ver}</th>
    <th width="23%">{$Think.lang.time}</th>
	<th width="15%">{$Think.lang.file_size}</th>
	<th width="10%">{$Think.lang.file_vol}</th>
    <th>{$Think.lang.handler}</th>
  </tr>
  <volist name="list" id="vo">
   <tr <eq name="vo.mark" value="2">style="display:none"</eq>>
    <td style="background-color: rgb(255, 255, 255);" class="first-cell" align="center"><input type="checkbox" id="chk1" name="chkvalue[]" onclick="openAll()" value="{$vo.name}" /></td>
    <td style="background-color: rgb(255, 255, 255);" align="center"><eq name="vo.mark" value="1"><img src="__PUBLIC__/Images/menu_plus.gif" onclick="rowClicked(this)">&nbsp;&nbsp;</eq><eq name="vo.mark" value="2"><img src="__PUBLIC__/Images/menu_arrow.gif" style=" margin-left:30px;">&nbsp;&nbsp;</eq><a href="__ROOT__/data/sqldata/{$vo.name}" title="{$Think.lang.file_save}">{$vo.name}</a></td>
	<td style="background-color: rgb(255, 255, 255);" align="center">{$vo.ver}</td>
    <td style="background-color: rgb(255, 255, 255);" align="center">{$vo.add_time}</td>
	<td style="background-color: rgb(255, 255, 255);" align="center">{$vo.file_size}</td>
	<td style="background-color: rgb(255, 255, 255);" align="center">vol:{$vo.vol}</td>
    <td style="background-color: rgb(255, 255, 255);" align="center">
	 <a href="__ROOT__/data/sqldata/{$vo.name}" title="{$Think.lang.file_save}"><img src="__PUBLIC__/Images/icon_copy.gif" border="0" width="16" height="16"></a>&nbsp;&nbsp;
     <a href="__URL__/import/act/do/f/{$vo.name}" title="{$Think.lang.import}" onclick="return confirm('{$Think.lang.import_confirm}');"><img src="__PUBLIC__/Images/icon_send_bonus.gif" border="0" width="16" height="16"></a></td>
  </tr>
  </volist>
<tr>
<td colspan="7" align="center">
<input value="{$Think.lang.drop}" id="btnSubmit" name="btnSubmit" class="button" disabled="true" type="submit">
<input type="hidden" name="delSql" value="do" /></td></tr>
  </tbody></table>
</div>
</form>
<include file="Public:pagefooter"/> 